package com.elm.serviceimpl;

import java.util.List;

import com.elm.dao.UserOrderDao;
import com.elm.daoimpl.UserOrderDaoImpl;
import com.elm.model.UserOrder;
import com.elm.service.UserOrderService;
/**

 *  

 * @author pgm

 *

 */
public class UserOrderServiceImpl implements UserOrderService{
	UserOrderDao uorderdao = new UserOrderDaoImpl();
	@Override
	public List<UserOrder> getAllPastOrder(int userid, int userorderstate) {
		
		return uorderdao.getAllPastOrder(userid, userorderstate);
	}
	@Override
	public List<UserOrder> getAllOrders() {
		
		return uorderdao.getAllOrders();
	}
	@Override
	public void insertOrder(String carid, int userorderstate, int userid) {
		// TODO Auto-generated method stub
		uorderdao.insertOrder(carid, userorderstate, userid);
	}
	public String getCaridByUserOrderId(int userorderid) {

		return uorderdao.getCaridByUserOrderId(userorderid);
	}
	@Override
	public int updateUserOrderState(int state, int userorderid) {

		return uorderdao.updateUserOrderState(state, userorderid);
	}
	@Override
	public int removeUserOrderState(int userorderid) {
		return uorderdao.removeUserOrderState(userorderid);
	}
}
